import request from "@/utils/request";
// 获取考试信息
export const getExamListAPi = (params) =>
  request({
    url: "/admin/exam/exam",
    method: "get",
    params,
  });
//获取学科列表
export const getSubjectListAPi = () =>
  request({
    url: "/admin/subject/tree",
    method: "get",
  });
// 获取试卷详情
export const getPaperDetailApi = (params) =>
  request({
    url: "/admin/exam/paper",
    method: "get",
    params, //subject_id\directory_id\show_state
  });

// 删除考试
export const delExamApi = (id) =>
  request({
    url: "/admin/exam/exam/" + id,
    method: "delete",
  });
// 增加考试
export const addExamApi = (data) =>
  request({
    url: "/admin/exam/exam",
    method: "post",
    data,
  });

// 获取班级列表
export const getClassListApi = (params) =>
  request({
    url: "/admin/class/class",
    method: "get",
    params,
  });
// 绑定班级
export const bindClassApi = (data) =>
  request({
    url: "/admin/exam/exam/bindClass",
    method: "post",
    data,
  });
